 $(document).ready(function() {  
   $(".title").click(function() {
        $(this).children("span").toggleClass('up').toggleClass('down'); 	
        $(this).next().toggle().next('p').toggle(); 
   });
   $(".left_more").click(function(){ 
       $(this).parent().prev().children("li").show(); 
       $(this).remove(); 
   });
   $("#hideMenu").click(function(){
   	   $("td[width='130']").css("width","0"); 
       $("#showMenu").show(0);
       $("#leftbody").hide();
       $("#middle_column,#overturebottom,.overtureBotom").css("width","750");
       if(jQuery.browser.msie){
   	   	  $(".keyword").css("width","745");
   	   }else{
   	   	  $(".keyword").css("width","733");
   	   } 
   });
   $("#showMenu").click(function(){
   	   if(jQuery.browser.msie){
   	   	  $(".keyword").css("width","643");
   	   }else{
   	   	  $(".keyword").css("width","633");
   	   } 
   	   $("#middle_column,#overturebottom,.overtureBotom").css("width","650");
       $(this).hide();
       $("#leftbody").show();
      
   });
   $("#cookie > a").click(function(){
	   $.cookie('coojin_shop_history_1',null,{path:'/'});
	   $.cookie('coojin_shop_history_2',null,{path:'/'});
	   $.cookie('coojin_shop_history_3',null,{path:'/'});
	   $.cookie('coojin_shop_history_4',null,{path:'/'});
	   $('#cookie').hide();
   });
 }); 

jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            } else {
                date = options.expires;
            }
            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
        }
        var path = options.path ? '; path=' + (options.path) : '';
        var domain = options.domain ? '; domain=' + (options.domain) : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    } else { 
        var cookieValue = null;
        if (document.cookie && document.cookie !== '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i=i+1) {
                var cookie = jQuery.trim(cookies[i]);
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};